import { Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import { AuthController } from './auth.controller';
import { JwtModule } from '@nestjs/jwt';
import { JWT_CONSTANT } from "./jwt.constant";
import { UsersModule } from 'src/modules/users/users.module';
import { JwtStrategy } from './jwt.strategy';
@Module({
  imports: [
    JwtModule.register({
      secret: JWT_CONSTANT.secret,
      // 添加其他选项，如过期时间等等
      signOptions: { expiresIn: 3600 * 24 * 7 + 's' }, // 签名有效时间
    }),
    UsersModule
  ],
  providers: [AuthService,JwtStrategy],
  controllers: [AuthController]
})
export class AuthModule { }
